package com.fastjpa.entity;
import javax.persistence.*;
import lombok.Getter;
import lombok.Setter;
import java.lang.Long;
import java.lang.String;
import com.fastjpa.entity.Clazz;
import java.util.List;
import com.efeichong.audit.InsertDefault;

/**
* @author admin
* @date 2022/07/17
* @description 教师
*/
@Setter
@Getter
@Entity(name = "teacher")
@Table(indexes = {
		@Index(name = "PRIMARY", columnList = "id", unique = true),
})
public class Teacher {
    /**id**/
    @Column(name = "[id]", columnDefinition = "bigint comment 'id'")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**老师名**/
    @Column(name = "[name]", columnDefinition = "varchar (50) comment '老师名'")
    private String name;

    /**租户id**/
    @Column(name = "[tenant_id]", columnDefinition = "varchar (20) comment '租户id'")
    private String tenantId;

    @ManyToMany(fetch = FetchType.LAZY,mappedBy = "teachers")
    private List<Clazz> clazzs;




}
